package com.yunji.system.dao.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yunji.common.base.BaseDaoImpl;
import com.yunji.common.model.domain.CaptchaPicsDO;
import com.yunji.common.model.params.CaptchaPicsParam;
import com.yunji.common.utils.bean.BeanUtils;
import com.yunji.system.dao.ICaptchaPicsDao;
import com.yunji.system.mapper.ICaptchaPicsMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.common.dao.impl
 * @Title: ICaptchaPicsDao
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-11-19 11:24:46      V1.0        HuaAo       新建类
 */
@Repository
public class CaptchaPicsDaoImpl extends BaseDaoImpl<ICaptchaPicsMapper, CaptchaPicsDO> implements ICaptchaPicsDao {

    @Override
    public List<CaptchaPicsDO> pageList(CaptchaPicsParam param) {
        return pageList(param, new LambdaQueryWrapper<CaptchaPicsDO>());
    }

    @Override
    public List<CaptchaPicsDO> search(CaptchaPicsDO param) {
        return list(new LambdaQueryWrapper<CaptchaPicsDO>().eq(BeanUtils.isNotNull(param.getStatus()), CaptchaPicsDO::getStatus, param.getStatus()));
    }

}